package cn.wzy.mapper;


import cn.wzy.pojo.Department;
import cn.wzy.vo.DepartmentVo;
import cn.wzy.vo.GoPageVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;


import java.util.List;

/**
 * (TDepartment)表数据库访问层
 *
 * @author makejava
 * @since 2022-12-08 13:53:14
 */
public interface DepartmentMapper extends BaseMapper<Department> {

//    通过id获取所有子部门
    List<DepartmentVo> getDepartments(Long id);

    void addDepartment(Department department);

    void updateDepartment(Department department);

    void deleteDepartment(Long id);

    List<DepartmentVo> getDepartmentsPage(@Param("stater") Long stater, @Param("end") Long end, @Param("keyword") String keyword);

    Long getTotal(GoPageVo goPageVo);

    List<Department> getDepartmentLower(Long id);

    List<Department> getDepartmentList(List<Long> ids);

    List<DepartmentVo> getDepLevel();

    Department getDepartmentById(Long id);

    List<DepartmentVo> getDepThreeLevel();
}

